// TODO: This file was created by bulk-decaffeinate.
// Sanity-check the conversion and remove this comment.
/*
 * decaffeinate suggestions:
 * DS102: Remove unnecessary code created because of implicit returns
 * DS206: Consider reworking classes to avoid initClass
 * Full docs: https://github.com/decaffeinate/decaffeinate/blob/main/docs/suggestions.md
 */
let GameUIState
const CocoModel = require('./CocoModel')

module.exports = (GameUIState = (function () {
  GameUIState = class GameUIState extends CocoModel {
    static initClass () {
      this.className = 'GameUIState'
      this.schema = {
        type: 'object',
        properties: {

          canDragCamera: {
            type: 'boolean',
            description: 'Serves as a lock to enable or disable camera movement.'
          },

          selected: {
            // TODO: Turn this into a collection which can be listened to? With Thang models.
            type: 'object',
            description: 'Array of selected thangs',
            properties: {
              sprite: { description: 'Lank instance' },
              thang: { description: 'Thang object generated by the world' }
            }
          },

          fastForwardingSpeed: {
            type: ['number', 'null'],
            description: 'Speed at which playback is fast-forwarding, if set (2.0 would be 2x speed)'
          },

          scrubbingPlaybackSpeed: {
            type: ['number', 'null'],
            description: 'Speed at which playback is scrubbing, if set (2.0 would be 2x speed)'
          }
        }
      }
    }

    defaults () {
      return {
        selected: [],
        canDragCamera: true,
        realTimeInputEvents: new Backbone.Collection(),
        fastForwardingSpeed: null,
        scrubbingPlaybackSpeed: null
      }
    }
  }
  GameUIState.initClass()
  return GameUIState
})())
